<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="../common/include/header.jsp" %>
<div style="width: 980px;">
<script type="text/javascript">
	
	function callAction(value)
	{
		document.modifyBoardActionForm.method.value = value;
		document.modifyBoardActionForm.submit();//검색요청한다.
	}

	function callDeleteAction(func)
	{
		if(confirm('해당 게시판을 삭제 하시겠습니까?'))
		{
			document.modifyBoardActionForm.method.value = "delete";
			document.modifyBoardActionForm.func.value = func;
			document.modifyBoardActionForm.submit();//삭제요청한다.
			return true;
		}
		else
		{
			return false;
		}
	}
	
	function callDeleteWindow(cono, boardkind)
	{
		var Url = "./board.do?method=init&cono="+cono+"&bkind="+boardkind;
		var Option = "toolbar=no,location=no,directories=no,status=no,menubar=no,scollbars=no,resizable=yes,width=300,height=100";
		var NewWindow = window.open(Url , "" , Option);;
		//NewWindow.opener = opener;
		//NewWindow.focus();
	}
</script>
<table style="width: 980px;" cellpadding="0" cellspacing="0">
	<tr>
		<td style="width: 180px;background: #e76969;vertical-align: top;">
			<!-- 메뉴화면--------------------------------------------------------- -->
			<%@ include file="./menu.jsp" %>
			<!-- ----------------------------------------------------------------- -->
		</td>
		<td style="width: 800px; vertical-align: top;text-align: center;padding-top: 10px;">
			<!-- 실제 컨텐츠 화면 표시부분---------------------------------------- -->
			<html:form action="/modifyboard" method="post">
			<input type="hidden" name="method" value="" />
			<input type="hidden" name="func" value="" />
			<!--게시판 기본 정보-->
			<table style="width: 700px;border: 1px solid #e76969;text-align: center;"><tr><td style="padding: 10px;">
			<table style="width: 600px;" cellpadding="0" cellspacing="0"><tr>
				 <td style="width: 600px;height: 20px;color: white;font-weight: bold;background: #e76969;">
				게시판 정보<td></tr></table>

		  	<TABLE style="width: 600px;border: 1px solid #e76969;">

			  <TR style="color: white;">
				<TD style="background: #e76969;width: 300px;">총게시물</TD>
				<TD style="background: #e76969;width: 300px;"><bean:write name="modifyBoardActionForm" property="allBoardCount"/>건</TD>
			  </TR>
			  <TR>
				<TD class="adminTd1">→공지게시판</TD>
				<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="noticeCount"/>건</TD>
			  </TR>
			  <TR>
				<TD class="adminTd1">→자유게시판</TD>
				<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="freeCount"/>건</TD>
			  </TR>
			  <TR>
				<TD class="adminTd1">→Q&A게시판</TD>
				<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="qnaCount"/>건</TD>
			  </TR>
			  <TR>
				<TD class="adminTd1">→자료게시판</TD>
				<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="dataCount"/>건</TD>
			  </TR>
			  <TR>
				<TD class="adminTd1">→앨범게시판</TD>
				<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="photoCount"/>건</TD>
			  </TR>
			  </TABLE>
			  </td></tr></table>

<div style="height: 10px;"></div>
			  <!--커뮤니티별 게시물 관리-->
			  <table style="width: 700px;border: 1px solid #e76969;" cellpadding="2" cellspacing="1"><tr><td style="padding: 10px;">
			  <TABLE style="width: 600px;border: 1px solid #e76969;" cellpadding="0" cellspacing="0">
			  <TR>
				 <TD colspan = "3" style="width: 600px;background: #e76969;height: 20px;color: white;font-weight: bold;">
				 커뮤니티별 게시판 관리
				 <TD>
			  </TR>
			  <TR>
			  	<TD style="width:200px;height: 25px;">커뮤니티 검색</TD>
			  	<TD style="width:200px;height: 25px;">
			  		<html:select property="searchCono" style="height: 18px;font-size: 8pt;">
			  			<html:optionsCollection property="communityInfo" label="coname" value="cono"/>
			  		</html:select><input type="button" value="검색" onclick="javascript:callAction('category')" class="adminSearch">
			  	</TD>
			  	<TD style="width:200px;height: 25px;">&nbsp;</TD>
			  </TR>
			  <TR>
				<TD colspan = "3"  class="adminTd1" style="color: #e76969;">
					<bean:write name="modifyBoardActionForm" property="coDisplayInfo"/>
				</TD>
			  </TR>
			  <logic:notEmpty name="modifyBoardActionForm" property="coFreeCount"> 
				  <logic:notEqual name="modifyBoardActionForm" property="coFreeCount" value="0">
				  <TR>
					<TD class="adminTd1">→자유게시판</TD>
					<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="coFreeCount"/>건</TD>
					<TD class="adminTd1">
						<a onclick="javascript:return callDeleteAction('free')" title="해당게시판전체삭제" onmouseover="javascript:this.style.cursor='hand';">게시판삭제</a>|
						<a onclick="javascript:return callDeleteWindow('<bean:write name="modifyBoardActionForm" property="searchCono" />','free')" title="특정사용자의게시물삭제" onmouseover="javascript:this.style.cursor='hand';">특정사용자삭제</a>
					</TD>
				  </TR>
				  </logic:notEqual>
			  </logic:notEmpty>
			  
			  <logic:notEmpty name="modifyBoardActionForm" property="coDataCount">
				  <logic:notEqual  name="modifyBoardActionForm" property="coDataCount" value="0">
					  <TR>
						<TD class="adminTd1">→자료게시판</TD>
						<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="coDataCount"/>건</TD>
						<TD class="adminTd1">
							<a onclick="javascript:return callDeleteAction('data')" title="해당게시판전체삭제" onmouseover="javascript:this.style.cursor='hand';">게시판삭제</a>|
							<a onclick="javascript:return callDeleteWindow('<bean:write name="modifyBoardActionForm" property="searchCono" />','data')" title="특정사용자의게시물삭제" onmouseover="javascript:this.style.cursor='hand';">특정사용자삭제</a>
							
						</TD>
					  </TR>
				  </logic:notEqual>
			  </logic:notEmpty>
			  
			  <logic:notEmpty name="modifyBoardActionForm" property="coPhotoCount" >
				  <logic:notEqual name="modifyBoardActionForm" property="coPhotoCount" value="0">
					  <TR>
						<TD class="adminTd1">→앨범게시판</TD>
						<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="coPhotoCount"/>건</TD>
						<TD class="adminTd1">
							<a onclick="javascript:return callDeleteAction('photo')" title="해당게시판전체삭제" onmouseover="javascript:this.style.cursor='hand';">게시판삭제</a>|
							<a onclick="javascript:return callDeleteWindow('<bean:write name="modifyBoardActionForm" property="searchCono" />','photo')" title="특정사용자의게시물삭제" onmouseover="javascript:this.style.cursor='hand';">특정사용자삭제</a>
						</TD>
					  </TR>
				  </logic:notEqual>
			  </logic:notEmpty>
			  
			  <logic:notEmpty name="modifyBoardActionForm" property="coNoticeCount">
				  <logic:notEqual name="modifyBoardActionForm" property="coNoticeCount" value="0">
					  <TR>
						<TD class="adminTd1">→공지게시판</TD>
						<TD class="adminTd1"><bean:write name="modifyBoardActionForm" property="coNoticeCount"/>건</TD>
						<TD class="adminTd1">&nbsp;
							<!-- <a onclick="javascript:return callDeleteAction('notice')" title="해당게시판전체삭제">게시판삭제</a>|
							<a onclick="javascript:return callDeleteWindow('<bean:write name="modifyBoardActionForm" property="searchCono" />','notice')" title="특정사용자의게시물삭제">특정사용자삭제</a>
							 -->
						</TD>
					  </TR>
				  </logic:notEqual>
			  </logic:notEmpty>
			</TABLE>
			</td></tr></table>
			</html:form>
			<!-- ----------------------------------------------------------------- -->
			
		</td>
	</tr>
</table>
</div>
<%@ include file="../common/include/footer.jsp" %>